Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for Skipped and Expected Failure test statuses #23

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

jszumski
Copy link
Collaborator

@jszumski jszumski commented Dec 1, 2023

Fixes #15

Adjusts the logic for handling test statuses to support all 4 possible values:

  • Success
  • Failure
  • Expected Failure
  • Skipped

@@ -374,7 +386,15 @@ public struct XCResultFormatter {

extension ActionTestMetadata {
var isFailed: Bool {
return testStatus != "Success"
return isSuccessful == false && isSkipped == false
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the substantive change. isSuccessful and isSkipped look for specific string values and any others are considered to be a failure.

Ideally this would be an enum in XCResultKit and we could switch on it.

Copy link
Owner

@a7ex a7ex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi John,
thanks for contributing.
Indeed, I was lazy not to cover the other cases properly in the beginning and then forgot about it.
Thank you for fixing this!

@a7ex a7ex merged commit fb1bcfa into a7ex:main Dec 1, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skipped tests shows as failed in txt results
2 participants